#include "Sight.h"

Sight::Sight(D3DXVECTOR2 pos,EObjectType type) : GameObject(pos,ESight)
{
	realType = type;
	switch(type)
	{
	case ECloud:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(Cloud_ID),2,1,2,0,1);
		break;
	case EGrass:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(Grass_ID),2,1,2,0,1);
		break;
	case EFence:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(Fence_ID));
		break;
	case EMoutain:
		m_pSprite = new CSprite(ResourceManager::GetIns()->GetTexture(Moutain_ID));
		break;
	}
	m_pSprite->m_TimeAni = 0.2f;
}

Sight::~Sight()
{
	GameObject::~GameObject();
}

void Sight::Update(float dt)
{
	if(realType == ECloud || realType == EGrass)
		m_pSprite->Update(dt);
}

void Sight::Draw()
{
	m_pSprite->Draw(m_position,SpriteEffect::None,0,1,0.1f);
}